interface doTStatic { 
    template(template :string): doTTemplateDelegate;
    template(template :string, settings: doTSettings): doTTemplateDelegate;
    template(template :string, settings: doTSettings, data: any): doTTemplateDelegate;
}

interface doTTemplateDelegate {
    (data: any): string;
}

interface doTSettings {
  evaluate?: RegExp;
  interpolate?: RegExp;
  encode?: RegExp;
  use?: RegExp;
  define?: RegExp;
  conditional?: RegExp;
  iterate?: RegExp;
  varname?: string;
  strip?: bool;
  append?: bool;
  selfcontained?: bool;
}

declare var doT: doTStatic;